integral of cos^2x by power reduction formula